From 1e1e59b5a72272357fe23d52c9999af54bb51960 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Mon, 20 Oct 2025 21:55:24 +0000 Subject: [PATCH] Create and document the DAD_STATUSES support table --- db/schemas/codes/indexes/Makefile | 1 + .../codes/indexes/create/dad_statuses.m4 | 27 ++++++++++++ db/schemas/codes/indexes/drop/dad_statuses.m4 | 24 ++++++++++ db/schemas/codes/tables/Makefile | 1 + .../codes/tables/create/dad_statuses.m4 | 28 ++++++++++++ doc/src/code_tables.m4 | 44 +++++++++++++++++++ doc/src/epilog.inc.m4 | 6 +++ 7 files changed, 131 insertions(+) create mode 100644 db/schemas/codes/indexes/create/dad_statuses.m4 create mode 100644 db/schemas/codes/indexes/drop/dad_statuses.m4 create mode 100644 db/schemas/codes/tables/create/dad_statuses.m4 diff --git a/db/schemas/codes/indexes/Makefile b/db/schemas/codes/indexes/Makefile index dc10fa6..f6f9ba2 100644 --- a/db/schemas/codes/indexes/Makefile +++ b/db/schemas/codes/indexes/Makefile @@ -23,6 +23,7 @@ ORDER := arrival_sources \ comm_ids \ comm_membs_sources \ cycle_states \ + dad_statuses \ obs_periods \ people \ role_codes diff --git a/db/schemas/codes/indexes/create/dad_statuses.m4 b/db/schemas/codes/indexes/create/dad_statuses.m4 new file mode 100644 index 0000000..03980f6 --- /dev/null +++ b/db/schemas/codes/indexes/create/dad_statuses.m4 @@ -0,0 +1,27 @@ +dnl Copyright (C) 2025 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`indexmacros.m4')dnl + +CREATE UNIQUE INDEX IF NOT EXISTS dad_statuses_status_uniquenocase + ON dad_statuses + (sdb_case_equivalence(status)); + diff --git a/db/schemas/codes/indexes/drop/dad_statuses.m4 b/db/schemas/codes/indexes/drop/dad_statuses.m4 new file mode 100644 index 0000000..2abf28c --- /dev/null +++ b/db/schemas/codes/indexes/drop/dad_statuses.m4 @@ -0,0 +1,24 @@ +dnl Copyright (C) 2025 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`macros.m4')dnl + +DROP INDEX IF EXISTS dad_statuses_status_uniquenocase; diff --git a/db/schemas/codes/tables/Makefile b/db/schemas/codes/tables/Makefile index 141f36b..d150ab0 100644 --- a/db/schemas/codes/tables/Makefile +++ b/db/schemas/codes/tables/Makefile @@ -25,6 +25,7 @@ ORDER := arrival_sources \ comm_ids \ comm_membs_sources \ cycle_states \ + dad_statuses \ departtypes \ entrytypes \ people \ diff --git a/db/schemas/codes/tables/create/dad_statuses.m4 b/db/schemas/codes/tables/create/dad_statuses.m4 new file mode 100644 index 0000000..84642e2 --- /dev/null +++ b/db/schemas/codes/tables/create/dad_statuses.m4 @@ -0,0 +1,28 @@ +dnl Copyright (C) 2025 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`tablemacros.m4')dnl +include(`grants.m4')dnl +dnl + +support_table(`DAD_STATUSES', `Status', `TEXT', ` + emptytext_check(`Status')' +) diff --git a/doc/src/code_tables.m4 b/doc/src/code_tables.m4 index 80b1c74..0db93e5 100644 --- a/doc/src/code_tables.m4 +++ b/doc/src/code_tables.m4 @@ -428,6 +428,50 @@ Description |CYCLE_STATES.Description_summary| |emptytext| +.. _DAD_STATUSES: + +DAD_STATUSES (Dad ID Statuses) +-------------------------------- + +.. |DAD_STATUSES_summary| replace:: + Contains one row for each status a |BIOGRAPHY_DATA|.\ + |BIOGRAPHY_DATA.DadID| might have, indicating the certainity or or + nature of the paternity assignment. + +|DAD_STATUSES_summary| + + +Special Values +`````````````` + +None. + + +Column Descriptions +``````````````````` + +.. _DAD_STATUSES.Status: + +Status +''''''''' + +.. |DAD_STATUSES.Status_summary| replace:: + A code identifying a paternity assignment status. + +|DAD_STATUSES.Status_summary| |caseuniquekeycol| |uppercase| + + +.. _DAD_STATUSES.Description: + +Description +''''''''''' + +.. |DAD_STATUSES.Description_summary| replace:: + A description of the status code. + +|DAD_STATUSES.Description_summary| |emptytext| |notnull| + + .. _OBS_PERIODS: OBS_PERIODS (Obsevervation Periods) diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index 307fe85..04a3024 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -223,6 +223,12 @@ sdb_generated_rst()dnl .. |CERTAINTIES.Description| replace:: :ref:`Description ` +.. |DAD_STATUSES| replace:: :ref:`DAD_STATUSES ` +.. |DAD_STATUSES.Status| replace:: + :ref:`Status ` +.. |DAD_STATUSES.Description| replace:: + :ref:`Description ` + .. |FOLLOWS| replace:: :ref:`FOLLOWS ` .. |FOLLOWS.FID| replace:: :ref:`FID ` -- 2.34.1